
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Grebok.Common;
using Grebok.Common.Configuration;

namespace EVegetable.Persistence.Test.DataManager
{
    public class TSys_AppAccessLevelManager : BaseManager
    {
        #region private field

        private static TSys_AppAccessLevelManager manager;
        #endregion

        #region Properties
        
        public Int32 AccessLevelID
        {
            get { return GetConfig<Int32>("AccessLevelID"); }
            set { SetConfig<Int32>("AccessLevelID", value); }
        }
        
        public String AccessLevelName
        {
            get { return GetConfig<String>("AccessLevelName"); }
            set { SetConfig<String>("AccessLevelName", value); }
        }
        
        public String LevelCode
        {
            get { return GetConfig<String>("LevelCode"); }
            set { SetConfig<String>("LevelCode", value); }
        }
        
        public String Description
        {
            get { return GetConfig<String>("Description"); }
            set { SetConfig<String>("Description", value); }
        }
        

        #endregion

        #region Constructor

        /// <summary>
        /// TSys_AppAccessLevelManager
        /// </summary>
        private TSys_AppAccessLevelManager()
        {
            IApplicationConfiguration configuration = ApplicationConfigurationFactor.CreateApplicationConfiguration();
            appPropertiese = new ApplicationProperties(configuration[PropertiesConst.TSYS_APPACCESSLEVEL_PROPERTIES_FILE_NAME_KEY],
                configuration[PropertiesConst.TSYS_APPACCESSLEVEL_PROPERTIES_SECTION_NAME_KEY]);

            appPropertieseValues = new Dictionary<string, object>();
        }
        #endregion

        #region TSys_AppAccessLevelManager Instance

        /// <summary>
        /// TSys_AppAccessLevelManager's Instance
        /// </summary>
        public static TSys_AppAccessLevelManager Instance
        {
            get
            {
                if (manager == null)
                {
                    manager = new TSys_AppAccessLevelManager();
                }
                return manager;
            }
        }
        #endregion

    }
}
